001 /* EVolve - an Extensible Software Visualization Framework
002 * Copyright (C) 2001-2002 Qin Wang
003 *
004 * This library is free software; you can redistribute it and/or
005 * modify it under the terms of the GNU Library General Public
006 * License as published by the Free Software Foundation; either
007 * version 2 of the License, or (at your option) any later version.
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Library General Public License for more details.
013 *
014 * You should have received a copy of the GNU Library General Public
015 * License along with this library; if not, write to the
016 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
017 * Boston, MA 02111-1307, USA.
018 */
019
020 /*
021 * EVolve is distributed at http://www.sable.mcgill.ca/EVolve/
022 */
023
024 package EVolve.visualization;
025
026 public class DimensionDefinition implements Cloneable{
027 private String name; // name of the dimension
028 private String property; // property required by the dimension
029
030 /**
031 * Creates a dimension definition.
032 *
033 * @param name name of the dimension
034 * @param property property required by the dimension
035 */
036 public DimensionDefinition(String name, String property) {
037 this.name = name;
038 this.property = property;
039 }
040
041 /**
042 * Gets the name of the dimension.
043 *
044 * @return name of the dimension
045 */
046 public String getName() {
047 return name;
048 }
049
050 /**
051 * Gets the property required by the dimension.
052 *
053 * @return property required by the dimension
054 */
055 public String getProperty() {
056 return property;
057 }
058
059 public Object clone() {
060 DimensionDefinition o = null;
061 try {
062 o = (DimensionDefinition)super.clone();
063 } catch (CloneNotSupportedException e) {
064 e.printStackTrace();
065 return null;
066 }
067 o.name = name;
068 o.property = property;
069 return o;
070 }
071 }